The precise timing of a patient stimulus and patient response in reference to the EEG data collected during brain assessment is important for diagnosis evaluation. Imprecise timing would not allow the proper data segment of the EEG trace to be time-synchronized with the actual stimulus/response event.
The function of a data collection engine is to collect data from each of the biosensors, human interface devices (HID) devices (including keystrokes and mouse/touchpad/touch screen events), and to provide synchronous time-stamping of data streams. The data collection engine will also communicate with the REM to receive data packet stream (e.g. via Bluetooth or Wi-Fi) and send configuration commands and stimulus data (e.g. audio files). The data collection engine will also provide timestamps for all output stimuli (video display). This module must have the highest priority of any program running on the device to ensure precise and accurate time stamping of all data is an incoming and outgoing.
For example, the interval between a mouse click, a keyboard switch contact, or a touchpad event and the software assigned timestamp must occur with the same latency for each event of that type. Additionally, the software generated timestamp of a mouse click must align precisely with the EEG data sample timestamps. Furthermore, the timestamp for a stimulus (such as display of an object on the video screen) must be accurately synchronized to input data streams. This will allow the ability to identify the exact EEG data sample that occurred during another input event (e.g. mouse click) or a stimulus event (e.g. video display event). When data collection is controlled with this level of precision, then differences in latencies across devices become less critical.
In non-deterministic environments the most critical thing is that jitter is minimized, not latency.
Generally, a computer server that collects biosensor data provides a ring buffer for client access functions as well as a storage buffer in volatile and memory or encrypted flat files. A data collection engine leverages the security/data encryption module to store data locally or retain in volatile memory (RAM) and transmits encrypted data to a cloud API using a cloud communications module. The I/O module will also allow other client software components access to the data stream. The server will also allow external devices to connect to the ring buffer for read only access.
For Windows operating systems there are a number of software products that allow an engine such as this to run in real-time or with real-time threads. On such product is the INTime for Windows by tenAsys described at: http://www.tenasys.com/overview-ifw.
With the Android operating system, this is much more difficult without rooting the device and replacing the kernel or the scheduler. However, with the newest version of Android OS and a number of software modifications, one may be able to create a near real-time data collection device. See, for example Mondia B S and Mdisetti V K, Reliable RealpTime Applications on Android OS, Georgia Tech, submitted 2010).
Currently, two levels of precision have been defined for the data collection engine.
Level 1: Timestamp precision of better than 10 milliseconds resolution. Most if not all functions will be at this level. For example, the time-stamping precision between keyboard events and EEG data-sample timestamps need to be less than 10 milliseconds. Specifically, a keyboard event will be time-stamped within 10 milliseconds of the EEG data sample with which it occurred.
Level 2: Timestamp precision within or less than one millisecond. This level of precision is reserved for two fundamental tasks: an audio evoked response potential (ERP) task and two reaction time tasks. At this level, a data sample timestamp must be synchronized across input streams within 1 millisecond. For example, with the audio ERP task, the start of an audio tone must occur and be time-stamped within 1 millisecond of the EEG data-sample with which it co-occurred. A second example is the reaction time task. Here, a mouse button press, keyboard press, or touch screen event must be time-stamped with a precision of 1 millisecond relative to the onset of an image on the screen. This level of precision is critical because human reaction times are measured on the millisecond or sub-millisecond scale.
Currently this level of precision is possible on a PC. However, this level of precision may not be possible on an Android tablet given that touch events are synchronized to the Vsync interrupt at 60 frames per second, which corresponds to a 16 millisecond resolution.
It is desired to synchronize the presentation of stimuli and probes on a commercial PC with a standard but non-real-time operating system such as Windows, Linux, Android, or iOS so that data may be acquired in real-time. The invention addresses these and other needs in the art.